﻿/******************************************************************************
  * Copyright  2023 - LiuKuan
  * All right reserved. See COPYRIGHT for detailed Information.
  *
  * @file       LineTempFactGroup.h
  * @brief      线温数据
  * @author     <807874484@qq.com>
  * @date       2024/07/19
  * @history
  *****************************************************************************/

#ifndef LINETEMPFACTGROUP_H
#define LINETEMPFACTGROUP_H

#include <QObject>
#include "Fact/Fact.h"
#include "Fact/FactGroup.h"
#include "Stdafx.h"
class LineTempFactGroup : public FactGroup
{
    Q_OBJECT
    ///ID
    Q_PROPERTY(Fact* id             READ id             CONSTANT)
    ///温度
    Q_PROPERTY(Fact* lineTemp       READ lineTemp       CONSTANT)
    ///系数
    Q_PROPERTY(Fact* factor         READ factor         CONSTANT)
    ///电流
    Q_PROPERTY(Fact* current        READ current        CONSTANT)
    ///故障位
    Q_PROPERTY(Fact* errorCode      READ errorCode      CONSTANT)
    ///位置描述信息
    Q_PROPERTY(Fact* describeInfo   READ describeInfo   CONSTANT)
    ///位置描述信息起始地址
    Q_PROPERTY_AUTO(int ,describeInfoAddress);
    ///ID 系数起始地址
    Q_PROPERTY_AUTO(int ,idAndFactorAddress);
    ///终端数据起始地址
    Q_PROPERTY_AUTO(int ,dataValeAddres);
public:
    LineTempFactGroup(QObject* parent = nullptr);

    Fact* id           (void)  { return &id_; }
    Fact* lineTemp     (void)  { return &lineTemp_; }
    Fact* factor       (void)  { return &factor_; }
    Fact* current      (void)  { return &current_; }
    Fact* errorCode    (void)  { return &errorCode_; }
    Fact* describeInfo (void)  { return &describeInfo_; }

    static const char* idFactName_;
    static const char* lineTempFactName_;
    static const char* factorFactName_;
    static const char* currentFactName_;
    static const char* errorCodeFactName_;
    static const char* describeInfoFactName_;
private:
    Fact id_;
    Fact lineTemp_;
    Fact factor_;
    Fact current_;
    Fact errorCode_;
    Fact describeInfo_;
};

#endif // LINETEMPFACTGROUP_H
